home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 8 / Revista do CD-ROM 8.iso / dados / program / skyborg / skyborg.exe / SHARED.DXR / 01012_tester.ls < prev    next >
Encoding:
Text File  |  1995-07-24  |  3.7 KB  |  113 lines

  1. on showrects
  2.   repeat with count = 24 to 34
  3.     set thisCast to the castNum of sprite count
  4.     put count & " -" & the name of cast thisCast & " - " & the rect of sprite count
  5.   end repeat
  6. end
  7.  
  8. on showallrects
  9.   set maxNameLen to 25
  10.   set padString to "                              "
  11.   repeat with count = 1 to 48
  12.     if the castNum of sprite count <> 0 then
  13.       set mySprite to count & padString
  14.       delete char 3 to 99 of mySprite
  15.       set thisCast to the castNum of sprite count
  16.       set myCastName to the name of cast thisCast & padString
  17.       set myRect to the rect of sprite count
  18.       delete char 26 to 99 of myCastName
  19.       put mySprite & " - " & myCastName & " - " & myRect
  20.     end if
  21.   end repeat
  22. end
  23.  
  24. on stripPath what
  25.   set oldDelim to the itemDelimiter
  26.   set the itemDelimiter to ":"
  27.   set what to the last item in what
  28.   set the itemDelimiter to oldDelim
  29.   return what
  30. end
  31.  
  32. on showclickrects
  33.   set maxNameLen to 25
  34.   set padString to "                              "
  35.   repeat with count = 3 to 12
  36.     if the castNum of sprite count <> 0 then
  37.       set mySprite to count & padString
  38.       delete char 3 to 99 of mySprite
  39.       set thisCast to the castNum of sprite count
  40.       set myCastName to the name of cast thisCast & padString
  41.       set myRect to the rect of sprite count
  42.       delete char 26 to 99 of myCastName
  43.       put mySprite & " - " & myCastName & " - " & myRect
  44.     end if
  45.   end repeat
  46. end
  47.  
  48. on TestSpeed1
  49.   global myCast
  50.   set myStartTime to the ticks
  51.   go(110)
  52.   puppetSprite(1, 1)
  53.   set myList to "Ratchet,Mad Jack Boweled,Linda Loveless,Latextra,Justice,Hypodermia,Reverend Thunderbones,Devlin McBane,Bullet-Brain,Dr. Phobic"
  54.   set myCount to the number of items in myList
  55.   repeat with count = 1 to myCount
  56.     set thisCast to item count of myList
  57.     set the castNum of sprite 1 to the number of cast thisCast
  58.     updateStage()
  59.   end repeat
  60.   put the ticks - myStartTime
  61. end
  62.  
  63. on TestSpeed2
  64.   global myCast
  65.   set myStartTime to the ticks
  66.   go(110)
  67.   puppetSprite(1, 1)
  68.   set myList to "Ratchet,Mad Jack Boweled,Linda Loveless,Latextra,Justice,Hypodermia,Reverend Thunderbones,Devlin McBane,Bullet-Brain,Dr. Phobic"
  69.   set myCount to the number of items in myList
  70.   repeat with count = 1 to myCount
  71.     set thisCast to getaProp(myCast, item count of myList)
  72.     set the castNum of sprite 1 to thisCast
  73.     updateStage()
  74.   end repeat
  75.   put the ticks - myStartTime
  76. end
  77.  
  78. on ClearCursors
  79.   repeat with count = 1 to 48
  80.     set the cursor of sprite count to 0
  81.   end repeat
  82. end
  83.  
  84. on crossCursors
  85.   repeat with count = 1 to 48
  86.     set the cursor of sprite count to 2
  87.   end repeat
  88. end
  89.  
  90. on TestSpeed3
  91.   global testList
  92.   set myList to "Ratchet,Mad Jack Boweled,Linda Loveless,Latextra,Justice,Hypodermia,Reverend Thunderbones,Devlin McBane,Bullet-Brain,Dr. Phobic,Ratchet,Mad Jack Boweled,Linda Loveless,Latextra,Justice,Hypodermia,Reverend Thunderbones,Devlin McBane,Bullet-Brain,Dr. Phobic,Ratchet,Mad Jack Boweled,Linda Loveless,Latextra,Justice,Hypodermia,Reverend Thunderbones,Devlin McBane,Bullet-Brain,Dr. Phobic,Ratchet,Mad Jack Boweled,Linda Loveless,Latextra,Justice,Hypodermia,Reverend Thunderbones,Devlin McBane,Bullet-Brain,Dr. Phobic"
  93.   set myCount to the number of items in myList
  94.   set testList to []
  95.   repeat with count = 1 to myCount
  96.     add(testList, item count of myList)
  97.   end repeat
  98.   set myStartTime to the ticks
  99.   repeat with anothercount = 1 to 10
  100.     repeat with count = 1 to myCount
  101.       set dummy to item count of myList
  102.     end repeat
  103.   end repeat
  104.   put the ticks - myStartTime
  105.   set myStartTime to the ticks
  106.   repeat with anothercount = 1 to 10
  107.     repeat with count = 1 to myCount
  108.       set dummy to getAt(testList, count)
  109.     end repeat
  110.   end repeat
  111.   put the ticks - myStartTime
  112. end
  113.